﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace LoghogInterface
{
    public class ViewModel : INotifyPropertyChanged
    {
        [DefaultValue(true)]
        protected bool _showID = true, _showDivision = true, _showTextEvent = true, _showDate = true, _showTags = true;
        public bool ShowID
        {
            get { return _showID; }
            set { if (_showID != value) { _showID = value; OnPC("ShowID"); } }
        }

        public bool ShowDivision
        {
            get { return _showDivision; }
            set { if (_showDivision != value) { _showDivision = value; OnPC("ShowDivision"); } }
        }

        public bool ShowTextEvent
        {
            get { return _showTextEvent; }
            set { if (_showTextEvent != value) { _showTextEvent = value; OnPC("ShowTextEvent"); } }
        }

        public bool ShowDate
        {
            get { return _showDate; }
            set { if (_showDate != value) { _showDate = value; OnPC("ShowDate"); } }
        }

        public bool ShowTags
        {
            get { return _showTags; }
            set { if (_showTags != value) { _showTags = value; OnPC("ShowTags"); } }
        }

        void OnPC(string a)
        {
            PropertyChangedEventHandler ph = PropertyChanged;
            if (ph != null)
                ph(this, new PropertyChangedEventArgs(a));

        }
        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion
    }
}
